package ro.ase.catalog.security.service;

import ro.ase.catalog.beans.Role;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Ioana
 * Date: 02.06.2014
 * Time: 00:55
 * To change this template use File | Settings | File Templates.
 */
public interface IRoleService {
    public List<Role> findByNameVaguePerPage(String name, int start, int limit);


    public int findByNameVagueCount(String name);


    public void deleteRoles(int[] roleIds) throws SecurityException, ro.ase.catalog.security.SecurityException;


    public void delete(Role role);


    public void add(Role role) throws SecurityException, ro.ase.catalog.security.SecurityException;


    public void update(Role role) throws SecurityException, ro.ase.catalog.security.SecurityException;


    public List<Role> findByUserIdPerPage(int userId, int start, int limit);


    public int findByUserIdCount(int userId);


    public void bindRolesToUser(int[] roleIds, int userId);


    public void unBindRolesFromUser(int[] roleIds, int userId);


    public List<Role> findByAuthorityIdPerPage(int authorityId, int start, int limit);


    public int findByAuthorityIdCount(int authorityId);


    public void bindRolesToAuthority(int[] roleIds, int authorityId);


    public void unBindRolesFromAuthority(int[] roleIds, int authorityId);

}
